<?php

namespace App\FrontModule\Presenters;

/**
 * Base presenter for all application presenters.
 */
abstract class BasePresenter extends \Nette\Application\UI\Presenter {
  
  /** @var \Kdyby\Doctrine\EntityManager @inject */
  public $em;
	
  /**
   * UserBox component
   * @return \App\Component\UserBox
   */
  public function createComponentUserBox(){
		$login = new \App\Component\UserBox();
		return $login;
	} 
  
  /**
   * Banner for homepage component
   * @return \App\Component\Banner
   */
  public function createComponentHomepageBanner(){
		$banner = new \App\Component\Banner();
    $banner->init('homepage_banner', $this->em);
		return $banner;
	}
  
  /**
   * Banner for video page component
   * @return \App\Component\Banner
   */
  public function createComponentVideoDetailBanner(){
		$banner = new \App\Component\Banner();
    $banner->init('video_detail_banner', $this->em);
		return $banner;
	}
  
  /**
   * Banner for comment component
   * @return \App\Component\Banner
   */
  public function createComponentCommentBanner(){
		$banner = new \App\Component\Banner();
    $banner->init('comment_banner', $this->em);
		return $banner;
	}
}
